home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / yerk / mps231ss.hqx / Mops source / Toolbox classes / Alert next >
Text File  |  1993-02-07  |  591b  |  36 lines

  1. \ Alert support.
  2.  
  3. type{    STOPALERT  NOTEALERT  CAUTIONALERT  }
  4.  
  5. :class    ALERT    super{ x-array }
  6.  
  7.     int    RESID
  8.     int    TYPE
  9.  
  10. :m SHOW:
  11.     word0  int: resID  0 ( procID )  get: type
  12.     SELECT{
  13.          StopAlert    IS{    call StopAlert        }END
  14.         NoteAlert    IS{    call NoteAlert      }END
  15.         CautionAlert    IS{    call CautionAlert    }END
  16.             DEFAULT{    call Alert
  17.     }SELECT
  18.     i->l  dup 0>
  19.     IF    1-  exec: super
  20.     ELSE    drop
  21.     THEN  ;m
  22.  
  23. :m INIT:    \ ( cfa1 ... cfaN N resID -- )
  24.     put: resID  put: super  ;m
  25.  
  26. :m SETTYPE:
  27.     put: type  ;m
  28.  
  29. :m DISP:    \ ( resID type -- )
  30.     put: type  put: resID  show: self  ;m
  31.  
  32. :m CLASSINIT:
  33.     16  put: type  ;m
  34.  
  35. ;class
  36.